
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListSelect 
	
AS
BEGIN
	SET NOCOUNT ON;
	SELECT 
		[PriceID]
		, [NameBG]
		, [PriceBGN]
		, [NameEN]
		, [PriceEUR]
	FROM 
		[PriceList]
    
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListUpdate
	@PriceID int,
	@NameBG nvarchar(300),
	@PriceBGN money,
	@NameEN nvarchar(300),
	@PriceEUR money
AS
BEGIN
	SET NOCOUNT ON;
		
	UPDATE 
		[PriceList] 
	SET 
		[NameBG] = @NameBG
		, [PriceBGN] = @PriceBGN
		, [NameEN] = @NameEN
		, [PriceEUR] = @PriceEUR 
	WHERE [PriceID] = @PriceID
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListInsert 
	@NameBG nvarchar(300),
	@PriceBGN money,
	@NameEN nvarchar(300),
	@PriceEUR money
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    INSERT INTO [PriceList] 
    (	[NameBG]
		, [PriceBGN]
		, [NameEN]
		, [PriceEUR])
	VALUES 
	(	@NameBG
		, @PriceBGN
		, @NameEN
		, @PriceEUR
	)
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListDelete 
	@PriceID int 
AS
BEGIN
	SET NOCOUNT ON;
  
	DELETE 
	FROM [PriceList] 
	WHERE 
		[PriceID] = @PriceID
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListSelectEN
	
AS
BEGIN
	SET NOCOUNT ON;
	SELECT 
		[PriceID]
		, [NameEN]
		, [PriceEUR]
	FROM 
		[PriceList]
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE up_PriceListSelectBG
	
AS
BEGIN
	SET NOCOUNT ON;
	SELECT 
		[PriceID]
		, [NameBG]
		, [PriceBGN]
	FROM 
		[PriceList]
END
GO

